using SvCore.Tcp;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Zpb;
using static ConfClient.Conf;

public class WdFly : MonoBehaviour
{
    public ModButton ModButton;

    // Start is called before the first frame update
    void Start()
    {
        foreach (var item in ConfCity.Values)
        {
            var obj = this.InstAdd(ModButton);
            obj.Text = item.Id;
            obj.FontSize = 60;
            obj.SetOnClick(OnButton);
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void OnButton(ModButton btn)
    {
        var Req = new C2GRoomFly();
        Req.City = btn.Text;
        MySocket.Send(Req);
    }
    public void G2CRoomFly(MyPackage pack)
    {
        //pack.GetMsg(out G2CRoomFly rsp);
    }
}
